 {template '_header'}

 <div class="page-header">当前位置：<span class="text-primary">订单评价</span></div>

 <div class="page-content">

<form action="./index.php" method="get" class="form-horizontal  table-search" role="form" id="form1">
    <input type="hidden" name="c" value="site" />
    <input type="hidden" name="a" value="entry" />
    <input type="hidden" name="m" value="mx_shop" />
    <input type="hidden" name="do" value="web" />
    <input type="hidden" name="r" value="sorder.comment" />
    <input type="hidden" name="status" value="{$status}" />
    <div class="page-toolbar row m-b-sm m-t-sm">
        <div class="col-sm-6">

            <div class="btn-group btn-group-sm" style='float:left'>
                <button class="btn btn-default btn-sm"  type="button" data-toggle='refresh'><i class='fa fa-refresh'></i></button>

            </div>
        </div>

        <div class="col-sm-6 pull-right">
            <div class="input-group">
                <div class="input-group-select">
                    <select name='searchfield'  class='form-control  input-sm select-md'   style="width:110px;"  >
                        <option value='member' {if $_GPC['searchfield']=='member'}selected{/if}>会员信息</option>
                        <option value='ordersn' {if $_GPC['searchfield']=='ordersn'}selected{/if}>订单号</option>
                        <option value='goods' {if $_GPC['searchfield']=='goods'}selected{/if}>设备名称</option>
                        <option value='mendian' {if $_GPC['searchfield']=='mendian'}selected{/if}>门店名称</option>
                    </select>
                </div>
                <input type="text" class="form-control input-sm"  name="keyword" value="{$_GPC['keyword']}" placeholder="请输入关键词"/>
				<span class="input-group-btn">
					<button class="btn btn-sm btn-primary" type="submit"> 搜索</button>

                    <!--<button type="submit" name="export" value="1" class="btn btn-success btn-sm">导出</button>-->

				</span>
            </div>

        </div>
    </div>
</form>

{if count($list)>0}

<table class="table table-hover">
    <thead class="navbar-inner">
    <tr>
        <th style='width:15%;'>订单号</th>
        <th style='width:9%;'>评价</th>
        <th style='width:25%;'>图片</th>
        <th style='width:25%;'>内容</th>
        <th style='width:15%;'>评价时间</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    {loop $list $row}
    <tr>
        <td>
            {ifp 'member.list.view'}
            <a  href="{php echo webUrl('member/list/detail',array('id' => $row['mid']));}" target='_blank'>
                <img src='{php echo tomedia($row['avatar'])}' style='width:30px;height:30px;padding1px;border:1px solid #ccc' /> {$row['realname']}
            </a>
            {else}
            <img src='{php echo tomedia($row['avatar'])}' style='width:30px;height:30px;padding1px;border:1px solid #ccc' /> {$row['realname']}
            {/if}
        </td>
        <td>{$comment[$row['level']]}</td>
        <td>
            {loop $row['images'] $val}
                <img src="{php echo tomedia($val)}" style="width: 3rem;height: 3rem"/>
            {/loop}
        </td>
        <td>{$row['content']}</td>
        <td >{php echo date('Y-m-d ', $row['createtime'])}<br>{php echo date('H:i:s', $row['createtime'])}</td>
        <td>
            {ifp 'sorder.comment.check'}
            {if $row['checked'] == 0}
            	<a class='btn btn-default btn-sm' data-toggle="ajaxPost" href="{php echo webUrl('sorder/comment/pass',array('id' => $row['id']))}" data-confirm="确认通过此评价吗？">审核通过</a>
                <br>
                <br>
            {/if}
            {/if}
            {ifp 'sorder.comment.del'}
            <a class='btn btn-default btn-sm' data-toggle="ajaxPost" href="{php echo webUrl('sorder/comment/del',array('id' => $row['id']))}" data-confirm="确认删除此评价吗？">删除</a>
            {/if}

        </td>
    </tr>
    {/loop}
    </tbody>
</table>
{$pager}

     {else}
     <div class="panel panel-default">
         <div class="panel-body empty-data">未查询到相关数据</div>
     </div>
     {/if}
 </div>

{template '_footer'}